﻿using System.Collections.Generic;

namespace WgFrame.Net.Protocols
{
	public abstract class IProtocol
	{
		public enum DeserializationFlags
		{
			None,
			AllowPooledByteArray
		}

		public abstract string ProtocolType
		{
			get;
		}

		public abstract byte[] VersionBytes
		{
			get;
		}

		public abstract void SerializeOperationRequest(StreamBuffer stream, short operationCode, Dictionary<byte, object> parameters, bool setType);

		public abstract void SerializeOperationResponse(StreamBuffer stream, OperationResponse serObject, bool setType);

		public abstract OperationRequest DeserializeOperationRequest(StreamBuffer din);

		public abstract OperationResponse DeserializeOperationResponse(StreamBuffer stream);
	}
}

